home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / netzwerk / tcp-ip / usno / docs / makefile.noinstall < prev    next >
Makefile  |  1996-02-26  |  1KB  |  57 lines

  1. #!/bin/ksh
  2. # Berkeley IPC programs  for setting time over the Internet
  3. #  R. Schmidt, Time Service, USNO
  4. #
  5. CFLAGS = -O
  6. #  For SunOS 4.x  uncomment the next line:
  7. #CFLAGS = -O -DSUN
  8. #
  9. BIN = /usr/local/bin
  10. MAN = /usr/local/man/man1
  11. INETD = /etc
  12. # for Sun:  uncomment the next line:
  13. # INETD = /usr/etc
  14.  
  15. all:    time_set timecheck  timesrv
  16. #  This line replaces the above if you want to provide the timer server
  17. #  on your local machine through inetd:
  18. #all:    time_set timecheck timesrv install_serv
  19.  
  20. time_set:    time_set.c
  21.     $(CC) $(CFLAGS) -o time_set time_set.c
  22.  
  23. timecheck:    timecheck.c
  24.     $(CC) $(CFLAGS) -o timecheck timecheck.c 
  25.  
  26. timesrv:    timesrv.c
  27.     $(CC) $(CFLAGS) -o timesrv timesrv.c
  28.  
  29. install:
  30.     chmod 744 time_set
  31.     chmod 755 timecheck
  32.     cp  time_set timecheck TIME_SET $(BIN)
  33.     cat etc.services>>/etc/services
  34.     cp *.1 $(MAN)
  35.  
  36. #  Only if you also want to be a time server:
  37. install_serv:
  38.     chmod 744 timesrv
  39.     chmod 744 time_set
  40.     chmod 755 timecheck
  41.     cp  timesrv time_set timecheck TIME_SET $(BIN)
  42.     cat etc.services>>/etc/services
  43.     cat etc.inetd.conf>>/etc/inetd.conf
  44.  
  45. #  On Sun, send SIGHUP to inetd:  Uncomment this line:
  46. #/bin/kill -1  `ps -ax | grep inetd | grep -v grep | cut -c 1-5 `
  47. #
  48. #  On HP, the restart for inetd is /etc/inetd -c :
  49. #  Comment out the next line for SunOS 4.x : 
  50.     $(INETD)/inetd -c
  51.     cp *.1 $(MAN)
  52.  
  53. # create shell archive:
  54. shar:
  55.     rm time.sh
  56.     shar -cmos * >time.sh
  57.